

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Pensieve</title>
<link href="yellow-effectz.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function deleteMessage(){
	alert("Deleted Successfully!");
	}
	
function authorize()
{
   var userName = document.getElementById('uname').value;
    var password = document.getElementById('upass').value;

  //  document.getElementById('type').value=='Admin';
    
  /*          
            if (window.XMLHttpRequest)
            {   // code for IE7+, Firefox, Chrome, Opera, Safari
                request=new XMLHttpRequest();
            }
            else
            {   // code for IE6, IE5
                request=new ActiveXObject("Microsoft.XMLHTTP");
            }
            
            request.onreadystatechange = function (){

                if (request.readyState==4 && request.status==200)
                {
                   alert(request.responseText);
                }
            
            }
/*
            
    if(xmlhttp) {
    xmlhttp.open("GET","gettime?" + getdate.getTime(),true); //gettime will be the servlet name
    xmlhttp.onreadystatechange  = handleServerResponse;
    xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlhttp.send(null);
  }
*/
            
        //    xmlhttp.open("GEt","MainControler?",true);            
           // xmlhttp.send();
                
          
    
    
	//alert(document.getElementById('type').value + document.getElementById('uname').value + document.getElementById('upass').value);
		/*if(document.getElementById('uname').value=='admin' && document.getElementById('upass').value=='12345' && document.getElementById('type').value=='Admin')
		{
			
	
			window.location = "index.jsp";
			
		
		}
		else if(document.getElementById('uname').value=='user' && document.getElementById('upass').value=='12345' && document.getElementById('type').value=='Inspector')
		{
		 	window.location = "Training.jsp";
		}
		else if(document.getElementById('uname').value=='mod' && document.getElementById('upass').value=='12345' && document.getElementById('type').value=='Moderator')
		{
		 	window.location = "moderatorMain.jsp";
		}
		else
		{
			alert("Wrong user name or password!");
		}*/
}
</script>
</head>

<body>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="50%" height="120"><table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="42" valign="bottom"><a href="index.jsp" class="logo">Pensieve</a></td>
          </tr>
          <tr>
    <td><a href="index.jsp" class="tag">A SOftware Requirement Inspection Software</a></td>
          </tr>
        </table></td>
        <td valign="bottom" style="padding-bottom:8px;"><table width="60%" border="0" align="right" cellpadding="0" cellspacing="0">
         
        </table></td>
      </tr>
    </table></td></td>
  </tr>
</table>
<form action ="MainControler?action=login" method="POST">
<div id="loginContainer">
<input type="text" id="uname" name="uname" style="width:300px; height:50px" placeholder="Enter your userName"/>
<br />
<br />
<input type="password" id="upass" name="upass" style="width:300px; height:50px"  placeholder="Enter your Password here"/>
<br />
<br />
<br />

<input style="background:gray;width:80px;height:30px; font-size:18px;color:#FFF" type="button" value="Login" />
</form>
<select id="type" style="margin-left:80px;">

<option>Select User Type</option>

<option>Admin</option>

<option>Inspector</option>
<option>Moderator</option>

<option></option>
</select>

</div>
2
</body>
</html>
